<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div class="wrapper">
      <div class="item"></div>
      <div class="item"></div>
      <div class="item"></div>
      <div class="item"></div>
    </div>
    <style>
      .wrapper {
        box-sizing: border-box;
        border: 1px solid black;
        display: flex;
        flex-wrap: wrap;
        width: 1000px;
      }
      .item {
        width: 300px;
        height: 300px;
        border: 1px solid black;
      }
      @media screen and (min-width: 350px) and (max-width: 450px) {
        .wrapper {
          width: 50%;
        }
        .item {
        }
      }
    </style>
  </body>
</html>
